{
  "title": "OnboardingMessage",
  "description": "A template with a title, icon, button and description. No markup allowed.",
  "version": "1.0.0",
  "type": "object",
  "properties": {
    "title": {
      "oneOf": [
        {
          "type": "string",
          "description": "The message displayed in the title of the onboarding card"
        },
        {
          "type": "object",
          "properties": {
            "string_id": {
              "type": "string"
            }
          },
          "required": ["string_id"],
          "description": "Id of localized string for onboarding card title"
        }
      ],
      "description": "Id of localized string or message override."
    },
    "text": {
      "oneOf": [
        {
          "type": "string",
          "description": "The message displayed in the description of the onboarding card"
        },
        {
          "type": "object",
          "properties": {
            "string_id": {
              "type": "string"
            },
            "args": {
              "type": "object",
              "description": "An optional argument to pass to the localization module"
            }
          },
          "required": ["string_id"],
          "description": "Id of localized string for onboarding card description"
        }
      ],
      "description": "Id of localized string or message override."
    },
    "icon": {
      "allOf": [
        {
          "type": "string",
          "description": "Image associated with the onboarding card"
        }
      ]
    },
    "primary_button": {
      "type": "object",
      "properties": {
        "label": {
          "oneOf": [
            {
              "type": "string",
              "description": "The label of the onboarding messages' action button"
            },
            {
              "type": "object",
              "properties": {
                "string_id": {
                  "type": "string"
                }
              },
              "required": ["string_id"],
              "description": "Id of localized string for onboarding messages' button"
            }
          ],
          "description": "Id of localized string or message override."
        },
        "action": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Action dispatched by the button."
            },
            "data": {
              "properties": {
                "args": {
                  "type": "string",
                  "description": "Additional parameters for button action, for example which link the button should open."
                }
              }
            }
          }
        }
      }
    },
    "secondary_buttons": {
      "type": "object",
      "properties": {
        "label": {
          "oneOf": [
            {
              "type": "string",
              "description": "The label of the onboarding messages' (optional) secondary action button"
            },
            {
              "type": "object",
              "properties": {
                "string_id": {
                  "type": "string"
                }
              },
              "required": ["string_id"],
              "description": "Id of localized string for onboarding messages' button"
            }
          ],
          "description": "Id of localized string or message override."
        },
        "action": {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "description": "Action dispatched by the button."
            },
            "data": {
              "properties": {
                "args": {
                  "type": "string",
                  "description": "Additional parameters for button action, for example which link the button should open."
                }
              }
            }
          }
        }
      }
    }
  },
  "additionalProperties": true,
  "required": ["title", "text", "icon", "primary_button"]
}
